package test.controller;

import model.User;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zul.Grid;
import org.zkoss.zul.ListModelList;

import admin.dao.UserDAO;

public class UserViewCtrlMVC extends SelectorComposer<Component>{

	private static final long serialVersionUID = 1L;

	@Wire
	private Grid userViewMVC;
	
	@Override
	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);
		userViewMVC.setModel(new ListModelList<User>(UserDAO.getAllUser()));
		userViewMVC.getPagingChild().setMold("os");
	}

}
